ABC156 C - Rally
https://atcoder.jp/contests/abc156/tasks/abc156_c
提出
code: python
n = int(input())
x = list(map(int, input().split()))
ans = float('inf')
for i in range(1, 101):
res = 0
for j in x:
res += pow(j-i, 2)
if (res < ans):
ans = res
print(ans)